package com.example.personnel_oa.controller;

import com.example.comment_oa.response.AjaxResponse;
import com.example.personnel_oa.service.SysEmployeePostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("personnelOa")
public class SysEmployeePostController {
    @Autowired
    SysEmployeePostService employeePostService;

    //员工入职后添加员工中间表
    @PostMapping("employeePost/addEmpPost/{postId}/{empId}")
    public AjaxResponse addEmpPost(@PathVariable("postId") int postId,@PathVariable("empId") int empId){
        int i = employeePostService.addEmpPoet(postId, empId);
        return AjaxResponse.success(i);
    }
}
